---
title: Magic Commands
---

If you run an interactive chat in python, you can use *magic commands* built for terminal usage:

```python
interpreter.chat()
```

The following magic commands will work:

- `%debug [true/false]`: Toggle debug mode
- `%reset`: Reset the current session
- `%undo`: Remove the last message and its response
- `%save_message [path]`: Save messages to a JSON file
- `%load_message [path]`: Load messages from a JSON file